#@adminLayout()
#define main()
<div class="card">
    #@cardAddOrEdit("企业信息管理 / "+(model?"修改":"新增"),"ciis/enterprise")
</div>
#end

###需要编辑的字段，默认展示了所有，需自己删除多余内容
#define cardCol()
<input type="hidden" name="enterprise.id" value="#(model.id??)">

<div class="col-sm-6">
    <div class="form-group">
        <lable>编号</lable>
        <input type="text" class="form-control" name="enterprise.code" value="#(model.code??)"
               placeholder="请输入编号">
        <i class="form-group__bar"></i>
    </div>
</div>
<div class="col-sm-6">
    <div class="form-group">
        <lable>名称</lable>
        <input type="text" class="form-control" name="enterprise.name" value="#(model.name??)"
               placeholder="请输入名称">
        <i class="form-group__bar"></i>
    </div>
</div>
<div class="col-sm-6">
    <div class="form-group">
        <lable>省</lable>
        <input type="text" class="form-control" name="enterprise.province" value="#(model.province??)"
               placeholder="请输入省">
        <i class="form-group__bar"></i>
    </div>
</div>
<div class="col-sm-6">
    <div class="form-group">
        <lable>市</lable>
        <input type="text" class="form-control" name="enterprise.city" value="#(model.city??)"
               placeholder="请输入市">
        <i class="form-group__bar"></i>
    </div>
</div>
<div class="col-sm-6">
    <div class="form-group">
        <lable>县</lable>
        <input type="text" class="form-control" name="enterprise.county" value="#(model.county??)"
               placeholder="请输入县">
        <i class="form-group__bar"></i>
    </div>
</div>
<div class="col-sm-6">
    <div class="form-group">
        <lable>具体位置</lable>
        <input type="text" class="form-control" name="enterprise.location" value="#(model.location??)"
               placeholder="请输入具体位置">
        <i class="form-group__bar"></i>
    </div>
</div>
<div class="col-sm-6">
    <div class="form-group">
        <lable>电话</lable>
        <input type="text" class="form-control" name="enterprise.telephone" value="#(model.telephone??)"
               placeholder="请输入电话">
        <i class="form-group__bar"></i>
    </div>
</div>
<div class="col-sm-6">
    <div class="form-group">
        <lable>手机</lable>
        <input type="text" class="form-control" name="enterprise.phone" value="#(model.phone??)"
               placeholder="请输入手机">
        <i class="form-group__bar"></i>
    </div>
</div>
<div class="col-sm-6">
    <div class="form-group">
        <lable>传真</lable>
        <input type="text" class="form-control" name="enterprise.fax" value="#(model.fax??)"
               placeholder="请输入传真">
        <i class="form-group__bar"></i>
    </div>
</div>
<div class="col-sm-6">
    <div class="form-group">
        <lable>邮编</lable>
        <input type="text" class="form-control" name="enterprise.zipCode" value="#(model.zipCode??)"
               placeholder="请输入邮编">
        <i class="form-group__bar"></i>
    </div>
</div>
<div class="col-sm-6">
    <div class="form-group">
        <lable>邮箱</lable>
        <input type="text" class="form-control" name="enterprise.mailbox" value="#(model.mailbox??)"
               placeholder="请输入邮箱">
        <i class="form-group__bar"></i>
    </div>
</div>
<div class="col-sm-6">
    <div class="form-group">
        <lable>创建时间</lable>
        <input type="text" class="form-control" name="enterprise.createAt" value="#(model.createAt??)"
               placeholder="请输入创建时间">
        <i class="form-group__bar"></i>
    </div>
</div>
<div class="col-sm-6">
    <div class="form-group">
        <lable>创建人</lable>
        <input type="text" class="form-control" name="enterprise.createAc" value="#(model.createAc??)"
               placeholder="请输入创建人">
        <i class="form-group__bar"></i>
    </div>
</div>

#end
<!--无用的可以删除-->
<!--下拉框样式-->
<script>
    if ($("select.select2")[0]) {
        var a = $(".select2-parent")[0] ? $(".select2-parent") : $("body");
        $("select.select2").select2({
            dropdownAutoWidth: !0,
            width: "100%",
            dropdownParent: a
        })
    }
    /*时间选择器加载*/
    $(".datetime-picker")[0] && $(".datetime-picker").flatpickr({
        enableTime: !0,
        nextArrow: '<i class="zmdi zmdi-long-arrow-right" />',
        prevArrow: '<i class="zmdi zmdi-long-arrow-left" />'
    });

    $(".date-picker")[0] && $(".date-picker").flatpickr({
        enableTime: !1,
        nextArrow: '<i class="zmdi zmdi-long-arrow-right" />',
        prevArrow: '<i class="zmdi zmdi-long-arrow-left" />',
    });

    $(".time-picker")[0] && $(".time-picker").flatpickr({
        noCalendar: !0,
        enableTime: !0
    });

    //过滤编辑页面
    if (window.location.href.indexOf("addOrEdit?id=") === -1) {
        var select = $("select");
        $.each(select, function (i, v) {
            var name = $(v).attr("name"), n = localStorage.getItem(name);
            if (n) {
                $("select[name='" + name + "'] option").eq(n).prop('selected', true);
            }
        })

        $("select").on('change', function () {
            var name = $(this).attr("name");
            localStorage.setItem(name, $('option:selected', this).index());
        });
    }
</script>